﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace Mapeo
{
    [Serializable]
    public class Padre
    {
        public virtual String ID { get; set; }
        public virtual bool NewInstance { get; set; }

        public virtual Object ValueByProperty(String Property)
        {
            Object ObjResult = null;
            Type Type = this.GetType();
            PropertyInfo pInfo = Type.GetProperty(Property);
            ObjResult = pInfo.GetValue(this, null);
            return ObjResult;
        }

    }
}
